perf: add fastpaths in _ModuleMeta.__call__#1230
Conversation
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
3004730 to
22e55df
Compare
_ModuleMeta.__call__
d9ee5db to
91f9270
Compare
…e handling Signed-off-by: nstarman <nstarman@users.noreply.github.com>
91f9270 to
f0d9e60
Compare
|
Ok. I think I've messed around with various ideas enough and this is PR is ready. |
|
(Gosh, this took me a long time to get around to.) So I don't love the
I get the sense this might be a consistent difference between us! A lot of your (excellent!) PRs have focused on speed, but I am definitely happy to trade a little speed for a simplified maintenance story. In particular in this case: initialising Equinox modules should happen pretty rarely in hot loops. Mostly this happens during model initialisation, or inside JIT'd regions. (And when crossing JIT boundaries, then we hit the flatten/unflattening API instead... which is an example of the opposite trade-off; here speed really does matter so much that I was happy to go as far as our codegen'd functions to order to optimize that case.) WDYT? |
|
What about for the performance-sensitive classes like |
__check_init____check_init__*AI disclosure: vibe engineered this. Looked over the code closely, but tests are Red/Green TDD.